{% from "components/macros/layout.html" import card, chip, stat_row %} {% from "components/macros/form.html" import action %} {% from "components/macros/table.html" import data_table %} {% macro job_detail(row) %}
{% if row.description %}

{{ row.description }}

{% endif %}

Function: {{ row.function or "unknown" }}

{{ chip("History", False, row.history, hx_replace(row.history, "#overseer-main"), "data-history") }} {{ action("Run now", hx_dialog(partials ~ "/confirm/run/" ~ row.id), "primary") }}
{% if row.stats %}{{ stat_row(row.stats) }}{% else %}

No runs yet

{% endif %}
{% endmacro %} {% call card("Scheduled jobs", jobs|length ~ " " ~ ("job" if jobs|length == 1 else "jobs")) %} {{ data_table([ {"key": "name", "label": "Job"}, {"key": "next_run", "label": "Next run"}, {"key": "schedule", "label": "Schedule"}, {"key": "state", "label": "Status", "kind": "status"}, ], jobs, empty="No scheduled jobs", detail=job_detail) }} {% endcall %}